//引入Vue
import Vue from 'vue'
//引入App
import App from './App.vue'
//引入axios
import axios from 'axios'

import router from '@/router'

// 引入字体图标
import '@/assets/icon/iconfont.css'
//引入MockServer.js----mock数据
import "@/mock/mockServe"

//关闭Vue的生产提示
Vue.config.productionTip = false
//引入VueRouter
//import VueRouter from 'vue-router'
//引入路由器
//import router from './router/index'
//使用路由器插件
Vue.use(router)
//在Vue的原型上添加axios
Vue.prototype.axios = axios
//更改网页名称
Vue.directive('title', {
  inserted: function (el) {
    document.title = el.dataset.title
  }
})
//创建vm
new Vue({
	render: h => h(App),
  router,
  beforeCreate() {
    Vue.prototype.$bus = this //安装全局事件总线，$bus就是当前应用的vm
  }
}).$mount('#app')